import request from '@/utils/request';

export const getDicts = params => {
  return request({
    url: '/steel-arch/client/dict/data/list',
    params: params,
    method: 'get',
  });
};

// 故障记录列表查询
export const getFaultList = params => {
  return request({
    url: '/steel-arch/client/device/fault/list',
    params,
  });
};

// 更换记录列表查询
export const getChangeList = params => {
  return request({
    url: '/steel-arch/client/device/parts/list',
    params,
  });
};

// 删除更换记录
export const deleteChange = data => {
  return request({
    url: '/steel-arch/client/device/parts/delete',
    method: 'post',
    data,
  });
};

// 新增更换记录
export const addChange = data => {
  return request({
    url: '/steel-arch/client/device/parts/saveOrUpdate',
    method: 'post',
    data,
  });
};

// 故障记录列表查询
export const getFaultDetail = params => {
  return request({
    url: '/steel-arch/client/device/maintain/list',
    params,
  });
};
